home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_070 / arc / arc.doc < prev    next >
Text File  |  1992-05-06  |  20KB  |  575 lines

  1.                                   ARC
  2.  
  3.                          File Archive Utility
  4.  
  5.  
  6. (C) COPYRIGHT 1985 by System Enhancement Associates; ALL RIGHTS RESERVED
  7.  
  8.  
  9. This file describes the ARC file utility, version 4.3, which was 
  10. created by System Enhancement Associates on 22 August 1985.  
  11.  
  12. ARC is the copyrighted property of System Enhancement Associates.  You 
  13. are granted a limited license to use ARC, and to copy it and 
  14. distribute it, provided that the following conditions are met: 
  15.  
  16. 1)  No fee may be charged for such copying and distribution.  
  17.  
  18. 2)  ARC may ONLY be distributed in its original, unmodified state.  
  19.  
  20.  
  21. Any voluntary contributions for the use of this program will be 
  22. appreciated, and should be sent to:
  23.  
  24.                      System Enhancement Associates
  25.                              21 New Street
  26.                            Wayne, NJ   07470
  27.  
  28. If you are using ARC in a commercial environment, then the 
  29. contribution is not voluntary.
  30.  
  31.  
  32. A word about user supported software:
  33.  
  34. The user supported software concept (usually referred to as 
  35. "freeware") is an attempt to provide software at low cost.  The cost 
  36. of offering a new product by conventional channels is staggering, and 
  37. hence dissuades many independant authors and small companies from 
  38. developing and promoting their ideas.  User supported software is an 
  39. attempt to develop a new marketing channel, where products can be 
  40. introduced at low cost.  
  41.  
  42. If user supported software works, then everyone will benefit.  The 
  43. user will benefit by receiving quality products at low cost, and by 
  44. being able to "test drive" software thoroughly before purchasing it.  
  45. The author benefits by being able to enter the commercial software 
  46. arena without first needing large sources of venture capital.
  47.  
  48. But it can only work with your support.  We're not just talking about 
  49. ARC here, but about all user supported software.  If you find that you 
  50. are still using a program after a couple of weeks, then pretty 
  51. obviously it is worth something to you, and you should send in a 
  52. contribution.
  53.  
  54.  
  55.  
  56. And now, back to ARC:
  57.  
  58. ARC is used to create and maintain file archives.  An archive is a 
  59. group of files collected together into one file in such a way that the 
  60. individual files may be recovered intact.  
  61.  
  62. ARC is different from other archive and library utilities in that it 
  63. automatically compresses the files being archived, so that the 
  64. resulting archive takes up a minimum amount of space.  
  65.  
  66. When ARC is used to add a file to an archive it analyzes the file to 
  67. determine which of four storage methods will result in the greatest 
  68. savings.  These four methods are: 
  69.  
  70. 1)  No compression; the file is stored intact.  
  71.  
  72. 2)  Repeated-character compression; repeated sequences of the same 
  73.     byte value are collapsed into a three-byte code sequence.  
  74.  
  75. 3)  Huffman squeezing; the file is compressed into variable length bit 
  76.     strings, similar to the method used by the SQ programs.  
  77.  
  78. 4)  Lempel-Zev compression;  the file is stored as a series of twelve 
  79.     bit codes which represent character strings, and which are created 
  80.     "on the fly".  
  81.  
  82. Note that since one of the four methods involves no compression at 
  83. all, the resulting archive entry will never be larger than the 
  84. original file.  
  85.  
  86.  
  87.  
  88.                                USING ARC
  89.                                =========
  90.  
  91. ARC is invoked with a command of the following format:
  92.  
  93.     ARC <x> <arcname> [<template> . . .]
  94.  
  95. Where:
  96.  
  97.     <x> is an ARC command letter (see below), in either upper or lower 
  98.     case.  
  99.  
  100.     <arcname> is the name of the archive to act on, with or without an 
  101.     extension.  If no extension is supplied, then ".ARC" is assumed.  
  102.     The archive name may include path and drive specifiers.
  103.  
  104.     <template> is one or more file name templates.  The "wildcard" 
  105.     characters "*" and "?" may be used.  A file name template may only 
  106.     include a path or drive specifier if you are adding a file to an 
  107.     archive.  
  108.  
  109. If ARC is invoked with no arguments (by typing "ARC", and pressing 
  110. "enter"), then a brief command summary is displayed.
  111.  
  112.  
  113.                              ARC COMMANDS
  114.                              ============
  115.  
  116. Following is a brief summary of the available ARC commands:
  117.  
  118.     a,u = add files to archive
  119.     m   = move files to archive
  120.     d   = delete files from archive
  121.     x,e = extract files from archive
  122.     r   = run files from archive
  123.     p   = copy files from archive to stdout
  124.     l   = list files in archive
  125.     v   = verbose listing of files in archive
  126.     t   = test archive integrity
  127.     c   = convert entry to new packing method
  128.     b   = retain backup copy of archive
  129.     w   = suppress warning messages
  130.     n   = suppress notes and comments
  131.  
  132. These commands are explained in more detail below.
  133.  
  134.  
  135.  
  136. ADDING FILES
  137. ------------
  138.  
  139. Files are added to an archive using the "A" (Add), "U" (Update), or 
  140. "M" (Move) commands.  Add and Update are identical.  Move differs in 
  141. that the source file is deleted once it has been added to the archive.
  142.  
  143. For example, if you wish to add a file named "TEST.DAT" to an archive 
  144. named "MY.ARC", you would use a command of the form:
  145.  
  146.     ARC a my test.dat
  147.  
  148. or:
  149.  
  150.     ARC u my.arc test.dat
  151.  
  152. If you wanted to move all files in your current directory into an 
  153. archive named "SUM.ARC", you could use a command of the form:
  154.  
  155.     ARC m sum *.*
  156.  
  157. If you wanted to add all files with a ".C" extension, and all files 
  158. named "STUFF" to an archive named "JUNK.ARC", you could type:
  159.  
  160.     ARC a junk *.c stuff.*
  161.  
  162. Archive entries are always maintained in alphabetic order.  Archive 
  163. entries may not have duplicate names.  If you add a file to an archive 
  164. that already contains a file by that name, then the existing entry in 
  165. the archive is replaced.  Also, the archive itself and its backup will 
  166. not be added.  
  167.  
  168. You may also add a file which is in a directory other than your 
  169. current directory.  For example, it is perfectly legal to type:
  170.  
  171.     ARC a junk c:\dustbin\stuff
  172.  
  173. The A, U, and M commands are the ONLY commands which allow you to give 
  174. a drive or path.  Also, you cannot add two files with the same name.  
  175. In other words, if you have a file named "C:\DUSTBIN\STUFF.TXT" and 
  176. another file named "C:\BUCKET\STUFF.TXT", then typing:
  177.  
  178.     arc a junk c:\dustbin\*.* c:\bucket\*.*
  179.  
  180. will not work.
  181.  
  182.  
  183.  
  184. DELETING FILES
  185. --------------
  186.  
  187. Archive entries are deleted with the "D" (Delete) command.  For 
  188. example, if you had an archive named "JUNK.ARC", and you wished to 
  189. delete all entries in it with a filename extension of ".C", you could 
  190. type: 
  191.  
  192.     ARC d junk *.c
  193.  
  194.  
  195.  
  196. EXTRACTING FILES
  197. ----------------
  198.  
  199. Archive entries are extracted with the "E" (Extract) and "X" (eXtract) 
  200. commands.  For example, if you had an archive named "JUNK.ARC", and 
  201. you wanted all files in it with an extension of ".TXT" or ".DOC" to be 
  202. recreated on your disk, you could type:
  203.  
  204.     ARC x junk *.txt *.doc
  205.  
  206. If you wanted to extract all of the files in an archive named 
  207. "JUNK.ARC", you could simply type:
  208.  
  209.     ARC x junk
  210.  
  211. Whatever method of file compression was used in storing the files is 
  212. reversed, and uncompressed copies are created in the current 
  213. directory.
  214.  
  215.  
  216.  
  217. RUNNING FILES
  218. -------------
  219.  
  220. Archive entries may be run without being extracted by use of the "R" 
  221. (Run) command.  For example, if you had an archive named "JUNK.ARC" 
  222. which contained a file named "LEMON.COM", which you wished to run, you 
  223. could type:
  224.  
  225.     ARC r junk lemon.com
  226.  
  227. You can run any file from an archive which has an extension of ".COM", 
  228. ".EXE", or ".BAT".  You cannot run interpretive BASIC programs from an 
  229. archive, nor can you give arguments to a program you are running from 
  230. an archive.
  231.  
  232. In practice, the file to be run is extracted, run, and then deleted.  
  233. All in all, this is a fairly useless command.
  234.  
  235.  
  236.  
  237. PRINTING FILES
  238. --------------
  239.  
  240. Archive entries may be examined with the "P" (Print) command.  This 
  241. works the same as the Extract command, except that the files are not 
  242. created on disk.  Instead, the contents of the files are written to 
  243. standard output.  For example, if you wanted to see the contents of 
  244. every ".TXT" file in an archive named "JUNK.ARC", but didn't want them 
  245. saved on disk, you could type:
  246.  
  247.     ARC p junk *.txt
  248.  
  249. If you wanted them to be printed on your printer instead of on your 
  250. screen, you could type:
  251.  
  252.     ARC p junk *.txt >prn
  253.  
  254.  
  255.  
  256. LISTING ARCHIVE ENTRIES
  257. -----------------------
  258.  
  259. You can obtain a list of the contents of an archive by using the "L" 
  260. (List) command or the "V" (Verbose list) command.  For example, to see 
  261. what is in an archive named "JUNK.ARC", you could type: 
  262.  
  263.     ARC l junk
  264.  
  265. If you are only interested in files with an extension of ".DOC", then 
  266. you could type:
  267.  
  268.     ARC l junk *.doc
  269.  
  270.  
  271. ARC prints a short listing of an archive's contents like this:
  272.  
  273.     Name          Length    Date
  274.     ============  ========  =========
  275.     ALPHA.TXT         6784  16 May 85
  276.     BRAVO.TXT         2432  16 May 85
  277.     COCO.TXT           256  16 May 85
  278.  
  279.  
  280. "Name" is simply the name of the file.
  281.  
  282. "Length" is the unpacked file length.  In other words, it is the 
  283. number of bytes of disk space which the file would take up if it were 
  284. extracted.
  285.  
  286. "Date" is the date on which the file had last been modified, as of the 
  287. time when it was added to the archive.
  288.  
  289.  
  290. ARC prints a verbose listing of an archive's contents like this:
  291.  
  292.     Name          Length    Stowage    SF   Size now  Date       Time    CRC
  293.     ============  ========  ========  ====  ========  =========  ======  ====
  294.     ALPHA.TXT         6784  Squeezed   35%      4413  16 May 85  11:53a  8708
  295.     BRAVO.TXT         2432  Squeezed   41%      1438  16 May 85  11:53a  5BD6
  296.     COCO.TXT           256   Packed     5%       244  16 May 85  11:53a  3AFB
  297.  
  298.  
  299. "Name", "Length", and "Date" are the same as for a short listing.
  300.  
  301. "Stowage" is the compression method used.  The following compression 
  302. methods are currently employed:
  303.  
  304.        --          No compression.
  305.      Packed        Runs of repeated byte values are collapsed.
  306.     Squeezed       Huffman squeeze technique employed.
  307.     Crunched       Lempel-Zev compression technique employed.
  308.  
  309. "SF" is the stowage factor.  In other words, it is the percentage of 
  310. the file length which was saved by compression.
  311.  
  312. "Size now" is the number of bytes the file is occupying while in the 
  313. archive.
  314.  
  315. "Time" is the time of last modification, and is associated with the 
  316. date of last modification.
  317.  
  318. "CRC" is the CRC check value which has been stored with the file.  
  319. Another CRC value will be calculated when the file is extracted or 
  320. tested to ensure data integrity.  There is no especially good reason 
  321. for displaying this value.
  322.  
  323.  
  324.  
  325. BACKUP RETENTION
  326. ----------------
  327.  
  328. When ARC adds or deletes archive entries it renames the original 
  329. archive to give it an extension of ".BAK", and then creates a new 
  330. archive with the desired changes.  If you wish to retain this original 
  331. copy of the archive for backup purposes, then add the "B" (Backup) 
  332. command to your other commands.
  333.  
  334. For example, if you wanted to delete all entries with an extension of 
  335. ".DOC" from an archive named "JUNK.ARC", but you wanted to keep a copy 
  336. around that still has them, then you could type:
  337.  
  338.     ARC bd junk *.doc
  339.  
  340. or:
  341.  
  342.     ARC db junk *.doc
  343.  
  344.  
  345.  
  346. MESSAGE SUPPRESION
  347. ------------------
  348.  
  349. ARC prints two types of messages, warnings and comments.
  350.  
  351. Warnings are messages about suspected error conditions, such as when a 
  352. file to be extracted already exists, or when an extracted file fails 
  353. the CRC error check.  Warnings may be suppressed by use of the "W" 
  354. (Warn) command.  You should use this command sparingly.  In fact, you 
  355. should probably not use this command at all.
  356.  
  357. Comments (or notes) are informative messages, such as naming each file 
  358. as it is added to the archive.  Comments and notes may be suppressed 
  359. by use of the "N" (Note) command.
  360.  
  361. For example, suppose you extracted all files with an extension of 
  362. ".BAS" from an archive named "JUNK.ARC"  Then, after making some 
  363. changes which you decide not to keep, you decide that you want to 
  364. extract them all again, but you don't want to be asked to confirm 
  365. every one.  In this case, you could type:
  366.  
  367.     ARC xw junk *.bas
  368.  
  369. Or, if you are going to add a hundred files with an extension of 
  370. ".MSG" to an archive named "TRASH.ARC", and you don't want ARC to list 
  371. them as it adds them, you could type:
  372.  
  373.     ARC an trash *.msg
  374.  
  375. Or, if you want to extract the entire contents of an archive named 
  376. "JUNK.ARC", and you don't want to hear anything, then type:
  377.  
  378.     ARC xnw junk
  379.  
  380.  
  381.  
  382. TESTING AN ARCHIVE
  383. ------------------
  384.  
  385. The integrity of an archive may be tested by use of the "T" (Test) 
  386. command.  This checks to make sure that all of the file headers are 
  387. properly placed, and that all of the files are in good shape.
  388.  
  389. This can be very useful for critical archives, where data integrity 
  390. must be assured.  When an archive is tested, all of the entries in the 
  391. archive are unpacked (without saving them anywhere) so that a CRC 
  392. check value may be calculated and compared with the recorded CRC 
  393. value.
  394.  
  395. For example, if you just received an archive named "JUNK.ARC" over a 
  396. phone line, and you want to make sure that you received it properly, 
  397. you could type:
  398.  
  399.     ARC t junk
  400.  
  401. It defeats the purpose of the T command to combine it with N or W.
  402.  
  403.  
  404.  
  405. CONVERTING AN ARCHIVE
  406. ---------------------
  407.  
  408. The "C" (Convert) command is used to convert an archive entry to take 
  409. advantage of newer compression techniques.  For example, if you had an 
  410. archive named "JUNK.ARC", and you wanted to make sure that all files 
  411. with an extension of ".DOC" were encoded using the very latest 
  412. methods, you could type:
  413.  
  414.     ARC c junk *.doc
  415.  
  416. Or if you wanted to convert every file in the archive, you could type:
  417.  
  418.     ARC c junk
  419.  
  420.  
  421.  
  422.                              SPECIAL NOTES
  423.                              =============
  424.  
  425. Whenever ARC encounters a fatal error condition it leaves the original 
  426. archive on disk, renamed to have an extension of ".BAK" (backup).  
  427.  
  428. The function used to calculate the CRC check value in previous 
  429. versions has been found to be in error.  It has been replaced in 
  430. version 3.0 with a proper function.  ARC will still read archives 
  431. created with earlier versions of ARC, but it will report a warning 
  432. that the CRC value is in error.  All archives created prior to version 
  433. 3.0 should be unpacked and repacked with the latest version of ARC.  
  434.  
  435. Transmitting a file with XMODEM protocol rounds the size up to the 
  436. next multiple of 128 bytes, adding garbage to the end of the file.  
  437. This used to confuse ARC, causing it to think that the end of the 
  438. archive was invalidly formatted.  This has been corrected in version 
  439. 3.03.  Older archives may still be read, but ARC may report them to be 
  440. improperly formatted.  All files can be extracted, and no data is 
  441. lost.  In addition, ARC will automatically correct the problem when it 
  442. is encountered.  
  443.  
  444.  
  445.  
  446.                          CHANGES IN VERSION 4
  447.                          ====================
  448.  
  449. ARC is adding another data compression technique in this version.  We 
  450. have been looking for some technique that could improve on Huffman 
  451. squeezing in at least a few cases.  So far, Lempel-Zev compression 
  452. seems to be fulfilling our fondest hopes, often acheiving compression 
  453. rates as much as 20% better than squeezing, and sometimes even better.  
  454. Huffman squeezing depends on some bytes being more "popular" 
  455. than others, taking the file as a whole.  Lempel-Zev compression is 
  456. instead looking for long strings of bytes which are repeated at 
  457. various points (such as an end of line followed by spaces for 
  458. indentation).  Lempel-Zev compression is therefor looking for 
  459. repetition at a more "macro" level, often acheiving impressive packing 
  460. rates.
  461.  
  462. Alas, nothing ever comes free.  This gain in storage efficiency comes 
  463. at the price of processor time.  ARC version 4.0 will usually take 
  464. about twice as long to add a file to an archive as version 3.1 did.  
  465. We intend to work on improving this in the future, but it will always 
  466. be slower since it must now work much harder to determine the best 
  467. packing method.
  468.  
  469. Fortunatly, file extraction is only slightly slower, to the point 
  470. where it will probably go unnoticed.
  471.  
  472. In the typical case a file is added to an archive once and then 
  473. extracted many times, so the increased time for an update should more 
  474. than pay for itself in increased disk space and reduced file 
  475. transmission time.
  476.  
  477. As usual, ARC version 4.0 is completely upward compatible.  That is, 
  478. it can deal properly with any archive created by any earlier version 
  479. of ARC.  It is NOT reverse compatible.  Archives created by ARC 4.0 
  480. will generally not be usable by earlier versions of ARC.  
  481.  
  482.  
  483.  
  484.                         CHANGES IN VERSION 4.1
  485.                         ======================
  486.  
  487. Version 4.1 does not contain any major changes from version 4.0.  
  488. Lempel-Zev coding has been improved somewhat by performing non-repeat 
  489. compression on the data before it is coded (as was already done with 
  490. Huffman squeezing).  This has the two fold advantage of (a) reducing 
  491. to some extent the amount of data to be encoded, and (b) increasing 
  492. the time it takes for the string table to fill up.  Performance gains 
  493. are small, but noticable.
  494.  
  495. The primary changes are in internal organization.  ARC is now much 
  496. "cleaner" inside.  In addition to the esthetic benefits to the author, 
  497. this should make life easier for the hackers out there.  There is also 
  498. a slight, but not noticable, improvement in overall speed when doing 
  499. an update.
  500.  
  501. Version 4.1 is still fully upward compatible.  But regretfully, it is 
  502. again not downward compatible.  Version 4.1 can handle any existing 
  503. archive, but creates archives which older versions (including 4.0) 
  504. cannot unpack.
  505.  
  506.  
  507.  
  508.                         CHANGES IN VERSION 4.3
  509.                         ======================
  510.  
  511. Version 4.3 adds the much-demanded feature of using pathnames when 
  512. adding files to an archive.  For obscure technical reasons, files 
  513. being extracted still go in the current directory on the current 
  514. drive.  Pathnames are also not supported for any of the other 
  515. commands, because it would make no sense.
  516.  
  517. Version 4.3 is also using a slightly different approach when adding a 
  518. file to an archive.  The end result is twofold:
  519.  
  520. 1) Slightly more disk space is required on the drive containing the 
  521.    archive.  This should only be noticeable to those creating very 
  522.    large archives on a floppy based system.  
  523.  
  524. 2) A 30% reduction in packing time has been achieved in most cases.  
  525.    This should be noticeable to everyone.  
  526.  
  527. As always, version 4.3 is still fully upwards compatible, and is 
  528. backwards compatible as far as version 4.1.
  529.  
  530.  
  531.  
  532.                       PROGRAM HISTORY AND CREDITS
  533.                       ===========================
  534.  
  535. In its short life thus far, ARC has astounded us with its popularity.  
  536. We first wrote it in March of 1985 because we wanted an archive 
  537. utility that used a distributive directory approach, since this has 
  538. certain advantages over the more popular central directory approach.  
  539. We added automatic squeezing in version 2 at the prompting of a 
  540. friend.  In version 2.1 we added the code to test for the best 
  541. compression method.  Now (in August of 1985) we find that our humble 
  542. little program has spread across the country, and seems to have become 
  543. a new institution.  
  544.  
  545. We are thankful for the support and appreciation we have received.  We 
  546. hope that you find this program of use.
  547.  
  548.  
  549. If we have acheived greatness, it is because we have stood upon the 
  550. shoulders of giants.  Nothing is created as a thing unto itself, and 
  551. ARC is no exception.  Therefore, we would like to give credit to the 
  552. following people, without whose efforts ARC could not exist:
  553.  
  554.  
  555. Brian W. Kernighan and P. J. Plauger, whose book "Software Tools" 
  556. provided many of the ideas behind the distributive directory approach 
  557. used by ARC.
  558.  
  559. Dick Greenlaw, who wrote the public domain SQ and USQ programs, in 
  560. which the Huffman squeezing algorithm was first developed.
  561.  
  562. Robert J. Beilstein, who adapted SQ and USQ to Computer Innovations 
  563. C86 (the language we use), thus providing us with important parts of 
  564. our squeezing logic.
  565.  
  566. Kent Williams, who graciously allowed us to use his LZWCOM and LZWUNC 
  567. programs as a basis for our Lempel-Zev compression logic.
  568.  
  569. David Schwaderer, whose article in the April 1985 issue of PC Tech 
  570. Journal provided us with the logic for calculating the CRC 16 bit 
  571. polynomial.
  572.  
  573.  
  574. And many, many others whom we could not identify.
  575.